{% extends 'TopxiaAdminBundle::layout.html.twig' %}

{% set menu = 'admin_operation_invite_manage' %}

{% block main %}
	<form  class="form-inline well well-sm" action="{{path('admin_invite')}}" method="get" novalidate>
    <input class="form-control" type="text" name="nickname" placeholder="用户名" value="{{ app.request.query.get('nickname')}}">
    <button class="btn btn-primary" type="submit">搜索</button>
	</form>

  <table class="table table-hover table-striped" >
		<thead>
			<tr>
				<th width="10%">用户名</th>
				<th width="10%">邀请人数</th>
				<th width="15%">付费用户数</th>
				<th width="20%">订单消费总额</th>
				<th width="15%">订单虚拟币总额</th>
				<th width="15%">订单现金总额</th>
				<th width="10%">操作</th>
			</tr>
		</thead>
		<tbody>
			{% if inviteInformations %}
				{% for inviteInformation in inviteInformations %}
					<tr>
					<td>{{inviteInformation.nickname}}</td>
					<td>{{inviteInformation.count}}</td>
					<td>{{inviteInformation.payingUserCount|default('0')}}</td>
					<td>{{inviteInformation.payingUserTotalPrice|default('0')}}</td>
					<td>{{inviteInformation.coinAmountPrice|default('0')}}</td>
					<td>{{inviteInformation.amountPrice|default('0')}}</td>
					<td><a href="#modal" data-toggle="modal" class="btn btn-default" data-url="{{path('admin_invite_detail',{inviteUserId:inviteInformation.id,payingUserCount:inviteInformation.payingUserCount} )}}">详细</a>
					</td>
					</tr>
				{% endfor %}
			{% else %}
				<tr><td colspan="20"><div class="empty">暂无页面记录</div></td></tr>
			{% endif %}
		</tbody>
	</table>

{{ web_macro.paginator(paginator) }}
{% endblock %}